package com.itheima.vip06;

public class Student {
    private String name;
    private int age;

   public Student(){

   }
   public Student(String name,int age){
       this.name = name;
       this.age = age;
   }

   public void setName(String name){
       this.name = name;
   }
   public void setAge(int age){
      if(age > 0 && age <= 150){
          this.age = age;
      }else {
          System.out.println("您输入的年龄有误！！！");
      }
   }

   public String getName(String name){
       return name;
   }
   public int getAge(int age){
       return age;
   }

   public void show(){
       System.out.println(name + "," + age);
   }

}
